/**
 * @description: Login interface parameters
 */
export interface LoginParams {
  userName: string;
  password: string;
}

export interface RoleInfo {
  roleName: string;
  value: string;
}

/**
 * @description: Get App information
 */
export interface AppInfo {
  appCode: string;
  appName: string;
  appEnv: string;
  appVersion: string;
  copyrightYear: string;
}

/**
 * @description: Login interface return value
 */
export interface LoginResultModel {
  code: number | undefined;
  message: string | undefined;
  result: {
    access_token: string;
    expires_in: number;
  };
}

/**
 * @description: Get user information return value
 */
export interface GetUserInfoModel {
  roles: RoleInfo[];
  // 用户id
  userId: string | number;
  // 用户名
  userName: string;
  // 真实名字
  realName: string;
  // 头像
  avatar: string;
  // 介绍
  desc?: string;
}

export interface GetUserLoginInfoModel {
  // 系统管理员用户名
  adminUserName: string;
  // 用户名
  userName: string;
  // 真实名字
  realName: string;
  // 头像
  avatar: string;
  // 应用信息
  appInfo: AppInfo;
  // 用户所拥有的权限标识
  keys: Object;
  // 首页路径
  homePath: string;
}
